<html>
  <head>
    <title>urlzen - a URL shortener for the social web</title>
    <link rel="stylesheet" type="text/css" href="/css/urlzen.css" />
    <meta name="description" value="urlzen is a better short url service designed for use on the social web.">
    <meta name="keywords" value="urlzen, tekzen, url, shortener, tinyurl, short url, tiny url, tiny">
    <script type="text/javascript" src="/copy/events.js"></script>
    <script type="text/javascript" src="/copy/htmlDecode.js"></script>
    <script type="text/javascript" src="/copy/swfobject.js"></script>
    <script type="text/javascript">
      var zenurl = "http://{{domain}}/{{slug}}"
      <!--
        function getUrl(url) {
          document.location = '/'+url;
        }
      // -->
    </script>
    <script type="text/javascript">
      <!--
      /* This script and many more are available free online at
      The JavaScript Source!! http://javascript.internet.com
      Created by: Mark O'Sullivan :: http://lussumo.com/
       Jeff Larson :: http://www.jeffothy.com/
       Mark Percival :: http://webchicanery.com/ */
      function copy(text2copy) {
        if (window.clipboardData) {
          window.clipboardData.setData("Text",text2copy);
        } else {
          var flashcopier = 'flashcopier';
          if(!document.getElementById(flashcopier)) {
            var divholder = document.createElement('div');
            divholder.id = flashcopier;
            document.body.appendChild(divholder);
          }
          document.getElementById(flashcopier).innerHTML = '';
          var divinfo = '<embed src="/copy/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
          document.getElementById(flashcopier).innerHTML = divinfo;
        }
      }
      
      // -->
    </script>
  </head>
  <body onload="{{onload}}">
    <div id="header">
      <a href="http://urlzen.com"><img src="/imgs/logo.png" alt="urlzen - short urls for the social web" border="0" /></a>
    </div>
    <div id="content">
      <form action="/" method="get" onsubmit="if (1) {getUrl(getElementById('url').value);return false;}">
        <p class="instructions">Enter a long URL and get a permanent (shorter) URL.</p>
        <label for="url">URL:</label>
        <input type="text" size="50" maxlength="255" value="{{url}}" name="url" id="url" />
        <input type="button" name="shorten" value="shorten" onclick="getUrl(getElementById('url').value);false;" />
      </form>
      <p><a href="{{url}}">{{url}}</a></p>
      <p>Here is your short URL:</p>
      <p class="short_url"><strong>http://{{domain}}/{{slug}}</strong></p>
      <p><input type="button" name="copybtn" id="copybtn" value="copy short url" onclick="copy('http://{{domain}}/{{slug}}');" /></p>
      <p class="summary_stats">So far, this url has been clicked <strong>{{clicks}}</strong> times from <strong>{{domains}}</strong> domains.</p>
      {% if domain_data %}
      <div id="domain_table">
        <table align="center" border="0" bgcolor="#CCCCCC" cellspacing="1" cellpadding="4">
          <tr bgcolor="#F0F0F0">
            <td>host</td>
            <td>clicks</td>
          </tr>
        {% for d in domain_data %}
          <tr bgcolor="#FFFFFF">
            <td>{{d.domain}}</td>
            <td>{{d.counter}}</td>
          </tr>
        {% endfor %}
        </table>  
      </div>
      {% else %}
      <div id="check back">
        <p>Check back to this page at any time to see how many times this short url has been clicked and from what domains.</p>
      </div>
      {% endif %}
      <p>Bookmarklet (drag the link to your bookmarks bar): <a href="javascript:void(location.href='http://urlzen.com/'+location.href)"  onmouseover="window.status='';return true" onclick="return false">urlzen this!</a></p>
    </div>
    <div style="margin-left:auto;margin-right:auto;width:500px;text-align:center;">{{ad_code}}</div>
    <div id="footer">
      &copy; 2008 tekzen inc. :: Developed by <a href="http://jaxn.org/" target="_blank">Jackson Miller</a> :: <a href="http://statzen.com">statzen - statistics for bloggers</a>
    </div>
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-1610393-3");
    pageTracker._initData();
    pageTracker._trackPageview();
    </script>
  </body>
</html>